namespace Legend.Threading
{
    using System.Threading;

    /// <summary>
    /// Factory that creates reader writer lock slim synchronization managers.
    /// </summary>
    public class ReaderWriterLockSlimFactory
        : ISynchronizationManagerFactory
    {
        public ISynchronizationManager CreateSynchronizationManager(LockRecursionPolicy recursionPolicy)
        {
            return new ReaderWriterLockSlimAdapter(new ReaderWriterLockSlim(recursionPolicy));
        }
    }
}
